home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Body Language - 48 Kinds of Fuck
/
The Body Language - 48 Kinds of Fuck.iso
/
mac
/
ERECTION.MST
< prev
next >
Wrap
Text File
|
1995-08-07
|
4KB
|
162 lines
'$DEFINE DEBUG ''Define for script development/debugging
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
''Dialog ID's
CONST WELCOME = 100
CONST ASKQUIT = 200
CONST DESTPATH = 300
CONST EXITFAILURE = 400
CONST EXITQUIT = 600
CONST EXITSUCCESS = 700
CONST OPTIONS = 800
CONST APPHELP = 900
CONST BADPATH = 6400
CONST SINGLELIST = 1900
''Bitmap ID
CONST LOGO = 1
GLOBAL DEST$ ''Default destination directory.
DECLARE SUB Install
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE FUNCTION ShowWindow LIB "User" (hwnd%, nCmdShow%) AS INTEGER
DECLARE FUNCTION aaebpt LIB "AAEBPT.DLL" (hWnd%, lpszDrive$, lpszPath$) AS INTEGER
INIT:
CUIDLL$ = "mscuistf.dll" ''Custom user interface dll
HELPPROC$ = "" ''Help dialog procedure
SetBitmap CUIDLL$, LOGO
SetTitle "ERECTION ╛»─▒»╠▀"
i% = ShowWindow(HwndFrame(), 3)
szInf$ = GetSymbolValue("STF_SRCINFPATH")
IF szInf$ = "" THEN
szInf$ = GetSymbolValue("STF_CWDDIR") + "ERECTION.INF"
END IF
ReadInfFile szInf$
DEST$ = MID$(GetWindowsDir, 1, 1) + ":\"
WELCOME:
sz$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", APPHELP, HELPPROC$)
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSE
GOSUB ASKQUIT
GOTO WELCOME
END IF
Install
LIST:
GetLocalHardDrivesList "ListItemsIn"
SetSymbolValue "ListItemsOut", MID$(GetWindowsDir, 1, 1)
sz$ = UIStartDlg(CUIDLL$, SINGLELIST, "FListDlgProc", APPHELP, HELPPROC$)
Target$ = GetSymbolValue("ListItemsOut")
if sz$ = "CONTINUE" then
IF aaebpt(0, Target$, DEST$ + "QTW") = 0 THEN
GOTO LIST
END IF
UIPop 1
ELSE
GOSUB ASKQUIT
GOTO LIST
END IF
QUIT:
ON ERROR GOTO ERRQUIT
IF ERR = 0 THEN
dlg% = EXITSUCCESS
ELSEIF ERR = STFQUIT THEN
dlg% = EXITQUIT
ELSE
dlg% = EXITFAILURE
END IF
QUITL1:
sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO QUITL1
END IF
UIPop 1
END
ERRQUIT:
END
ASKQUIT:
sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
IF sz$ = "EXIT" THEN
UIPopAll
ERROR STFQUIT
ELSEIF sz$ = "REACTIVATE" THEN
GOTO ASKQUIT
ELSE
UIPop 1
END IF
RETURN
'**
'** Purpose:
'** Builds the copy list and performs all installation operations.
'** Arguments:
'** none.
'** Returns:
'** none.
'*************************************************************************
SUB Install STATIC
SrcDir$ = GetSymbolValue("STF_SRCDIR")
'CreateDir DEST$, cmoNone
AddSectionFilesToCopyList "Files", SrcDir$, DEST$
CopyFilesInCopyList
CreateProgmanGroup "ERECTION", "", cmoNone
ShowProgmanGroup "ERECTION", 1, cmoNone
CreateProgmanItem "ERECTION", "48ÄΦ", MID$(SrcDir$, 1, 1) + ":\START.exe", "", cmoOverwrite
CreateProgmanItem "ERECTION", "README", MID$(SrcDir$, 1, 1) + ":\README.WRI", "", cmoOverwrite
END SUB
'**
'** Purpose:
'** Appends a file name to the end of a directory path,
'** inserting a backslash character as needed.
'** Arguments:
'** szDir$ - full directory path (with optional ending "\")
'** szFile$ - filename to append to directory
'** Returns:
'** Resulting fully qualified path name.
'*************************************************************************
FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
IF szDir$ = "" THEN
MakePath = szFile$
ELSEIF szFile$ = "" THEN
MakePath = szDir$
ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
MakePath = szDir$ + szFile$
ELSE
MakePath = szDir$ + "\" + szFile$
END IF
END FUNCTION